<?php

// 添加规则
$router->post('/create', 'IntegralController@create');
// 删除规则
$router->get('/delete/{id:[0-9]+}', 'IntegralController@delete');
// 修改规则
$router->post('/edit/{id:[0-9]+}', 'IntegralController@edit');
// 查询规则
$router->get('/index/{id:[0-9]+}', 'IntegralController@index');
// 幸运积分红包规则
$router->get('/luck/{shop_id:[\w]+}', 'IntegralController@luck');
// 查询规则
$router->get('/lists/{shop_id:[\w]+}/{page:[0-9]+}', 'IntegralController@lists');
/*----------------------------------------------------------------------*/
// 订单积分入口
$router->post('/entrance', 'IntegralController@entrance');
// 积分支付
$router->post('/pay', 'IntegralController@pay');
// 退还积分
$router->post('/rollback', 'IntegralController@rollback');
// 规则修改记录
$router->get('/rolehistory/{shop_id:[\w]+}/{page:[0-9]+}', 'IntegralController@roleHistory');
// 幸运积分红包详情
$router->get('/task/luck/{shop_id:[\w]+}/{page:[0-9]+}', 'IntegralController@taskLuck');
// 天天积分红包详情
$router->get('/task/day/{shop_id:[\w]+}/{page:[0-9]+}', 'IntegralController@taskDay');
$router->get('/task/day/order/{shop_id:[\w]+}/{user_id:[\w,]+}/{page:[0-9]+}', 'IntegralController@taskDayByUser');
// 手动积分红包详情
$router->get('/task/manual/{shop_id:[\w]+}/{page:[0-9]+}', 'IntegralController@taskManual');
$router->get('/task/manual/{shop_id:[\w]+}/{user_id:[\w,]+}/{page:[0-9]+}', 'IntegralController@taskManualByUser');
/*----------------------------------------------------------------------*/
// 商户积分池
$router->get('/shop/total/{shop_id:[\w]+}', 'IntegralController@shopTotal');
// 商户流水
$router->get('/shop/flow/{shop_id:[\w]+}/{page:[0-9]+}', 'IntegralController@shopFlow');
/*----------------------------------------------------------------------*/
// 用户积分池
$router->get('/user/total/{user_id:[\w,]+}/{shop_id:[\w]+}', 'IntegralController@userTotal');
// 用户流水
$router->get('/user/flow/{user_id:[\w,]+}/{page:[0-9]+}', 'IntegralController@userFlow');
/*----------------------------------------------------------------------*/
// 订单红包
$router->get('/redpack/{order_num:[\w]+}', 'IntegralController@redPack');
// 每天红包
$router->get('/redpack/day/{user_id:[\w,]+}', 'IntegralController@redPackByDay');
/*----------------------------------------------------------------------*/
// 手动任务
$router->post('/manual/task', 'IntegralController@shopManualTasks');
/*----------------------------------------------------------------------*/
// 停止所有用户红包分发
$router->get('shop/{status:stop|start|status}/{type:day|manual|luck}/{shop_id:[\w]+}', 'IntegralController@shopTasksStatus');
// 停止、开启天天红包任务(用户)
$router->get('/user/{status:stop|start}/{type:day|manual|luck}/{shop_id:[\w]+}/{user_id:[\w,]+}', 'IntegralController@userTasksStatus');
// 清空 天天红包任务(用户)
$router->get('/user/clear/{type:day|manual|luck}/{shop_id:[\w]+}/{user_id:[\w,]+}', 'IntegralController@clearUserTasks');
// 停止 天天红包任务(任务)
$router->get('/task/{status:stop|start}/{task_ids:[\w,]+}', 'IntegralController@taskStatus');
// 清空 天天红包任务(任务)
$router->get('/task/clear/{task_ids:[\w,]+}', 'IntegralController@clearTasks');
/*----------------------------------------------------------------------*/